﻿namespace QFramework
{
    using UnityEngine;
    using FairyGUI;

    public class Basics_MainData : IUIData
    {

    }

    public partial class Basics_Main : FGUIBehaviour
    {

        protected override void InitUI(IUIData uiData = null)
        {
            mData = uiData as Basics_MainData;

            //UIConfig.buttonSound = /*Basics_Source.Source_sound_click*/;

            //btn_Back.visible = false;
            //btn_Back.onClick.Add(() => { controller_c1.selectedIndex = 0; btn_Back.visible = false; });

            GetAllButton();
        }

        protected override void ProcessMsg(int eventId, QMsg msg)
        {
            throw new System.NotImplementedException();
        }

        protected override void RegisterUIEvent()
        {
           
        }

        protected override void Button(string ButtonName)
        {
            //controller_c1.selectedIndex = 1;
            //btn_Back.visible = true;

            //GComponent tempA = container.asCom;
            //tempA.RemoveChildren();

            //switch (ButtonName)
            //{
            //    case "Text":
            //        tempA.AddChild(FUIMgr.OpenPanel<Basics_Demo_Text>());
            //        break;
            //}
        }

        protected override void OnShow()
        {
            base.OnShow();
        }

        protected override void OnHide()
        {
            base.OnHide();
        }

        protected override void OnBeforeDestroy()
        {
            FUIMgr.DestroyPanle<Basics_Demo_Text>();
            base.OnBeforeDestroy();
        }

        void ShowLog(string content)
        {
            Debug.Log("[ Basics_Main:]" + content);
        }

        Basics_MainData mData = null;

    }
}
